package com.sl.au.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import com.sl.au.entity.Division;
import com.sl.au.entity.DivisionManager;

public interface DivisionManagerRepository extends JpaRepository<DivisionManager, String>{

	Page<DivisionManager> findByDivision(Pageable pageable, Division division);

	@Query("select count(*) from DivisionManager d where d.division=?1")
	long findCountByDivison(Division division);

}
